<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>初体验</title>
</head>

<body>
  <!-- 行内js -->
  <button onclick="alert('点我干嘛?');">点我呀</button>
  <!-- 引入外部js -->
  <script src="./js/index.js">
    // 能不能在这个里面写js代码?
    // 不能
    alert('写了吗?')
  </script>
  <!-- 页内js -->
  <script>
    console.log('我被执行了~')
    console.warn('我被执行了~')
    console.error('我被执行了~')
    const num1 = 100, num2 = 200
    console.log(num1 + num2)

    sum(600, 789)
  </script>

</body>

</html>